package com.jsyl.lwbk.common.enums;

/**
 * 训练项目输入类型
 */
public enum ModifyDirectionEnum {

    /** 1：增加 */
    INPUTTYPE_ADD(1, "增加"),
    /** 2：减少 */
    INPUTTYPE_REDUCE(2, "减少");




    private Integer type;
    private String name;

    private ModifyDirectionEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static Integer getModifyDirection(String name) {
        ModifyDirectionEnum[] enums = values();
        for (ModifyDirectionEnum e : enums) {
            if (e.getName().equals(name)) {
                return e.getType();
            }
        }
        return null;
    }
}
